
import { employeeListAll } from "@/api/employee";

export async function dialogsFunc() {
    const { data = [] } = await employeeListAll()
    const selects = data.map(item => {
        return {
            label: item.user_name,
            value: item.user_name
        }
    })

    return {
        fields: [                           
            {                               
                el    : 'str-input',       
                label : '项目名',           
                value : 'name',        
                rule  : { required: true }, 
                option: {}                 
            },
            {                               
                el    : 'iv-select',     
                label : '主管',           
                value : 'user_name',        
                rule  : { required: true }, 
                option: {
                    selects
                }                
            },
            {
                el    : 'iv-date-picker',
                label : '起始时间',
                value : 'start_time',
                option: {
                    type: 'date',
                }
            }
        ]
    }
}